package com.xci.platform.auth.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelIgnore;
import com.xci.platform.core.Constant;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;

/**
 * 系统反馈
 */
@Data
public class FeedbackEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 反馈主键
     */
    @NotBlank(message = "反馈主键不能为空")
    @ExcelIgnore
    private String id;
  
    /**
     * 反馈类型
     */
    @NotBlank(message = "反馈类型不能为空")
    @Excel(name = "反馈类型")
    private String category;
  
    /**
     * 反馈标题
     */
    @NotBlank(message = "反馈标题不能为空")
    @Excel(name = "反馈标题")
    private String title;
  
    /**
     * 反馈内容
     */
    @Excel(name = "反馈内容")
    private String feedbackContent;

    /**
     * 状态 0 未关闭 1 已关闭
     */
    @Excel(name = "反馈状态")
    private Integer status;

    public String getStatusText() {
        switch (status) {
            case 0:
                return "未关闭";
            case 1:
                return "已关闭";
        }
        return Constant.Empty;
    }
  
    /**
     * 回复次数
     */
    @Excel(name = "回复次数")
    private Long replyCount;
  
    /**
     * 回复状态 0 未回复 1 已回复
     */
    @Excel(name = "回复状态")
    private Integer replyStatus;

    public String getReplyStatusText() {
        switch (replyStatus) {
            case 0:
                return "未回复";
            case 1:
                return "已回复";
        }
        return Constant.Empty;
    }

    /**
     * 操作用户主键
     */
    @ExcelIgnore
    private String operateUserId;

    /**
     * 操作用户
     */
    @Excel(name = "操作用户")
    private String operateUserName;

    /**
     * 操作日期
     */
    @Excel(name = "操作日期",width = 15,exportFormat = Constant.DefaultDateTimePattern)
    private Date operateDateTime;
  
}
